import Vue from 'vue';
import Vuex from 'vuex';
import { queryDepart } from '@/api/system/tbSysDept';
Vue.use(Vuex)
const state = {}
const getters = {}
const actions = {
	//获取部门列表数据
	async getDepartList({ commit }, data) {
		let result = await queryDepart(data).then(res => res.data)
		if (result.code === '0') {
			return !result.data ? [] : result.data;
		} else {
			Promise.reject(new Error('faile'));
		}
	}
}
const mutations = {}
export default { state, getters, actions, mutations }